// @ts-ignore
/* eslint-disable */
import request from "../utils/request.ts";

/** addRoom POST /api/room/add */
export async function addRoomUsingPost(
  body: API.RoomAdd,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong_>("/api/room/add", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** getRoomInfo GET /api/room/getRoomInfo */
export async function getRoomInfoUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getRoomInfoUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseRoomInfoVO_>("/api/room/getRoomInfo", {
    method: "GET",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** listPageRoom GET /api/room/list/page */
export async function listPageRoomUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listPageRoomUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePagePageRoomVO_>("/api/room/list/page", {
    method: "GET",
    params: {
      // current has a default value: 1
      current: "1",
      // pageSize has a default value: 10
      pageSize: "10",
      ...params,
    },
    ...(options || {}),
  });
}

/** verifyPassword POST /api/room/verifyPassword */
export async function verifyPasswordUsingPost(
  body: API.VerifyPassword,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/room/verifyPassword", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}
